#!/usr/bin/env bash


gcloud logging read \
  --freshness=1m \
  --flatten=jsonPayload.data \
  --order=asc \
  | grep -v '\-\-\-' \
  | sed "s/^  \'//" \
  | sed "s/'$//" \
  | sed 's/\\e\[6;30m//g' \
  | sed 's/\\e\[0m//g' \
  | sed 's/e\[0m//g' \
  | sed 's/\\e\[6;31m//g' \
  | sed 's/\\\\\\n//g' \
  | sed 's/\\\\n//g' \
  | sed 's/\\n//g' \
  | sed 's/\\\\\\//g' \
  | sed 's/\\\\//g' \
  | sed 's/\\//g' \
  | sed 's/log"/log/' \
  | sed 's/"log/log/'

